package com.example.demo.utils.map;

import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.example.demo.utils.Tutils;
import org.junit.Test;

import java.util.HashMap;

public class MapTest {

    @Test
    public void testmap() {

        HashMap<Object, Object> map = Tutils.newHashMap();
        map.put("name","张萨安");
        map.put("age",25);
        System.out.println(MapUtil.getStr(map,"name"));
        System.out.println(MapUtil.join(map,",",":"));
        System.out.println(MapUtil.reverse(map));
        System.out.println(MapUtil.isNotEmpty(map));
    }


    @Test
    public void testStr() {
        String s1 = "hello";
        String s2 = " ";
        System.out.println(StrUtil.isBlank(s2));
        System.out.println(StrUtil.isEmpty(s2));
        System.out.println(StrUtil.startWith(s1,"he"));
        System.out.println(StrUtil.endWith(s1,"o"));
//        System.out.println(StrUtil.contains(s1,"llo"));
        System.out.println(StrUtil.removeAll(s1,"l"));
        System.out.println(StrUtil.upperFirst(s1));
        System.out.println(StrUtil.reverse(s1));

    }



}
